#pragma once
#include <string.h>
#include "Constants.h"
#include <stdio.h>

class AlgorithmInterface
{	
public:
	AlgorithmInterface()
	{
		logger = fopen("log.csv","w");	
	}
	virtual ~AlgorithmInterface()
	{
		fclose(logger);
	}
	virtual void run(int initialState[SIZE])=0;
	virtual void clear()=0;
	virtual double getSolutionQualityFactor() {return 0;}
	virtual int getNumOfSolutionUpdates() {return 1;}
	virtual bool hasMoreMemory()=0;
	virtual int expandUntilFindGoal()=0;
	char* getName() {return algorithmName;}	
	double factor;
	int numOfSolutionUpdates;
	char algorithmName[100];
	int expanded;                               /* total number of nodes expanded */
	int generated;                             /* total number of nodes generated */
	int reopened;  /* number of closed states a shorter path was found to */
	int updated;   /* number of open states a shorter path was found to */
	int closed;										 /** number of closed states **/
	int depth;                                        /* depth of solution found */
	int stored;                                  /* total number of states stored */
	int goalUpperbound; /* Described an upperbound on the goal */
	double desiredSuboptimality; /* Describe the suboptimality of the goal upperbound */


	
	FILE* logger; // For debug purposes
};
